var app = getApp()

//获取钱包地址
function getWalletSetting(callback) {
  app.func.Get(false, app.api.wallet_setting, { "userId": getApp().globalData.userId },
    function (res) {
      typeof callback == "function" && callback(res)
    })
};

/**
 * 竞赛钱包(竞赛奖励总额，可提现总额)
 */
function getCompetitionBalanceDetail(callback) {
  app.func.Get(false, app.api.competition_balance_detail, function (res) {
    typeof callback == 'function' && callback(res);
  });
}

/**
 * 竞赛钱包(竞赛奖励总额，可提现总额)
 */
function getFocusUxuan(callback) {
  app.func.Post(false, app.api.get_user_focusUxuan, function (res) {
    typeof callback == 'function' && callback(res);
  });
}

module.exports ={
  getWalletSetting: getWalletSetting,
  getCompetitionBalanceDetail: getCompetitionBalanceDetail,
  getFocusUxuan: getFocusUxuan
}